import type { CardDetail, CardParams } from "@/types/card"
import { request } from "@/utils/reuqest"

/****
 * 新增月卡
 */
export const createCardAPI =(data:CardParams)=>{
  return request('/parking/card','POST',data)
}
/**
 * 获取月卡详情
 * @data
 * @returns
 */
export const  getCardDetailAPI = (id: string) => {
  return request<CardDetail>(`/parking/card/detail/${id}`, 'GET')
}

/**
 * 更新月卡
 * @param {*} data
 * @returns
 */
export const updateCardAPI = (data: CardParams) => {
  return request('/parking/card/edit', 'PUT', data)
}